import { Navigate } from "react-router-dom";
import { getToken } from "../../utils";
const AuthRoute = ({children}) => {
  const orToken = getToken()
  if(orToken){
    return <>{children}</>
  }else{
    return <Navigate to="/login" replace={true} />
  }
}
export default AuthRoute;